/* 
 * File:   InvertedFile.h
 * Author: eduardo
 *
 * Created on 14 de noviembre de 2012, 14:20
 */

#ifndef INVERTEDFILE_H
#define	INVERTEDFILE_H

#include <iostream>
#include <vector>
#include "Dictionary.h"
#include "DictionaryDB.h"
#include "PostingFile.h"
#include "PostingFileDB.h"
#include "DocTerms.h"
#include "AgentDB.h"
#include "IdDocs.h"
using namespace std;

class InvertedFile {
public:
    InvertedFile();
    ~InvertedFile();

    int getDictSize();

    void addDoc(DocTerms* index, const string& name);
    void toPersist();

private:
    int _count;
    Dictionary* _dict;
    PostingFile* _pf;
    
    int _countID;
    vector<IdDocs> _docsID;
};

#endif	/* INVERTEDFILE_H */

